<!DOCTYPE html>
<html lang="en" style="width: 100%;height: 100%;margin: 0;padding: 0">
<head>
    <meta charset="UTF-8">
    <title>对话框</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <style>
        *{
            color: #ffffff;
        }
    </style>
</head>

<body style="width: 100%;height: 100%;margin: 0;padding: 0">

<div id="app">
    <div>失败的组件</div>
    <alert-dialog></alert-dialog>
</div>

<script>
    <!--全局组件没有s-->
    Vue.component("alert-dialog",
        {
           template:"<div style='width: 100%;height: 100%;z-index:9999999;position: fixed;top: 0;background:#000000;opacity: 0.3'><div style='top:50%;left: 50%;width: 300px;height: 300px'>我是对话框</div></div>"

        }
    );

    var v = new Vue({
        el: '#app',
    })


</script>

</body>
</html>